<html>
<head>
<title id="title">My title</title>
<script type="text/javascript">
var i = 1
function changeBorder()
{
document.getElementById('myTable').border="10";
document.getElementById('hey').innerHTML = "999";
}
function changeTitle()
{
document.getElementById('title').innerHTML = "TITLE (" + i + ")";
if(i >=3 && i < 6){
document.getElementById('meh').focus();
}
i++;
}
function load(){
alert("Welcome");
}
</script>
</head>
<body onload="load()">

<table border="1" id="myTable">
<tr>
<td id="hey">100</td>
<td>200</td>
</tr>
<tr>
<td>300</td>
<td>400</td>
</tr>
</table>
<br />
<input type="button" onclick="changeBorder()" value="Change Border" />
<input type="text" onKeyUp="changeTitle()"><br />
<input type="text" id="meh" />
</body>
</html>

